﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
using System.Text.Json.Serialization;
using Digitalmes.Model;
using Digitalmes.Model.PackageManagement;

namespace Digitalmes.Model.PackageManagement
{
    /// <summary>
    /// 装箱打印参数
    /// </summary>
	[Table("PackagePara")]

    [Display(Name = "_Model.PackagePara")]
    public class PackagePara : BasePoco,IPersistPoco,ITenant
    {
        [Key]
        [Display(Name = "_Model._PackagePara._ID")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public new long ID { get; set; }
        [Display(Name = "_Model._PackagePara._ValueName")]
        [Comment("值名称")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string ValueName { get; set; }
        [Display(Name = "_Model._PackagePara._ValueMode")]
        [Comment("值类型")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public ValueTypeEnum? ValueMode { get; set; }
        [Display(Name = "_Model._PackagePara._Value")]
        [Comment("值")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string Value { get; set; }
        [Display(Name = "_Model._PackagePara._Remark")]
        [Comment("备注")]
        public string Remark { get; set; }
        [Display(Name = "_Model._PackagePara._Scheme")]
        [Comment("方案")]
        public PackageScheme Scheme { get; set; }
        [Display(Name = "_Model._PackagePara._Scheme")]
        [Comment("方案")]
        public long? SchemeId { get; set; }
        [Display(Name = "_Model._PackagePara._IsValid")]
        [Comment("是否有效")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public bool IsValid { get; set; } = true;


        [Display(Name = "_Model._ProductLable._Pos")]
        [Comment("顺序")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public int Pos { get; set; }

        [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
        public string TenantCode { get; set; }

	}

}
